/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.poss.api.domain;

import java.util.List;
import javax.persistence.*;


/**
 *
 * @author sampath
 */
@Entity
public class Items {
    private long itemId;
    private String itemName;
    private String itemCode;
    private String itemDescription;
    private List<ItemsInStock> availableItems;

    @OneToMany(targetEntity=ItemsInStock.class, mappedBy="itemsInStockItem", cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    public List<ItemsInStock> getAvailableItems() {
        return availableItems;
    }

    public void setAvailableItems(List<ItemsInStock> availableItems) {
        this.availableItems = availableItems;
    }

    public String getItemCode() {
        return itemCode;
    }

    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }

    public String getItemDescription() {
        return itemDescription;
    }

    public void setItemDescription(String itemDescription) {
        this.itemDescription = itemDescription;
    }

    @Id
    @GeneratedValue
    public long getItemId() {
        return itemId;
    }

    public void setItemId(long itemId) {
        this.itemId = itemId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }
    
    
}
